Create Security Rule Slider

Use the Create Security Rules slider to create content security policies and page security rules, and to insert JavaScript into your site's code.

Option

Description

Name

Enter a descriptive name for each rule you create. For example, CSP for Checkout Pages.

Rule Type

Content Security Policy

Controls which third parties and other services can access your site's pages.

Page Security

Controls which third parties and other services can access form fields, cookies, and storage.

JavaScript Injection

Inserts JavaScript into your site in the yo.configure call.

The options change dynamically depending on what rule type you select. Use the drop-downs below to see the options for each rule type. 

Additional Options

These options are available for all rule types.

Option

Description

Apply to

All Page Views Applies the rule every time a customer loads a page on your site
Specific Page Views

You can set the following options:

Page URL Sets what URLs the rule applies to, based on whether any part of the URL contains or excludes certain strings.
User AgentClosed A string generated by the browser that includes the type of browser and device that the customer used to access the page. Sets what browser or device type the rule applies to.
Geo Sets what geographic locations the rule applies to.
Header Name Existence Sets what page views the rule applies to based on whether the page contains or excludes a specific header.
Header Value Sets what page views the rule applies to based on any header value. Type the header into the first box and the value into the second box.
Client IP Sets the rule to apply only to specific IP addresses. You can use this property for testing. For example, you could set the rule to apply only for people in your company.
Client Property This option allows you to set more granular parameters for the browser properties that the rule applies to.
Custom Data Property Sets the rule to apply to certain data values on your site. For example, you could set the rule to apply to certain product prices.
Split Test Applies the rule to a set percentage of traffic. Select the split test and the variations in the drop-down menus. For more information on creating split tests, see Split Tests.

Profiles

Sets which profiles to apply the rule to. You can create profiles in Settings > Context Intelligence.

Override States

Apply to Control Traffic Applies the rule to the traffic that is normally left unoptimized.
Apply During Bypass Mode Applies the rule even when your site status is set to bypass.

Notes (optional)

Use the Notes field to add important information for your team. For example, if you are creating a temporary rule for testing, you can indicate that in the notes.